
<template>
	<div class="index">

		<div class="center">
			<left></left>
			<div class="right">
          <top></top>
          <div class="hei10"></div>
          <div class="where" style="background: #fff; padding: 10px 30px; font-size: 14px; color: #595959;">
            当前位置：
            <router-link to="/index" style="color: #409eff;">分销后台</router-link>>
            <router-link to="/orderImport" style="color: #409eff;"  >订单导入</router-link>>不复制订单的用户订单
          </div>


          <!-- <div class="hei10"></div>
          <div class="where" style="background: #fff; padding: 10px 30px; font-size: 14px; color: #595959;">当前位置：分销后台><router-link to="/zhibotongji">直播统计</router-link>>主播管理</div>
          --><div class="hei10"></div>
		  	<div class="title">不复制订单的用户名单</div>
        	<div style="background: rgb(218, 231, 245); color: rgb(100, 112, 118); padding: 15px 20px; font-size: 14px; margin-bottom: 20px;">该名单中的用户不会被导入复制订单，复制操作将自动跳过他们</div>
                <div class="t_table_box">
                    <el-button @click="daka" round style="margin-bottom: 20px;" type="danger">添加名单</el-button>
                    <el-table
                        :header-cell-style="{
                        background:'#F4F4F4',
                        color:'#7D8087'}"
                        :data="tableData"
                        
                        style="width: 100%">
                        <el-table-column
                        prop="id"
                        label="序号">
                        <template slot-scope="scope">
                            {{ scope.$index+1 }}
                        </template>
                        </el-table-column>
                        
                        <el-table-column
                        prop="created_at"
                        label="添加时间">
                        </el-table-column>
                        <el-table-column
                        prop="id_card_num"
                        label="身份证号">
                        </el-table-column>
                        <el-table-column label="操作">
                        <template slot-scope="scope">
                            <el-button
                            size="mini"
                            type="text"
                            @click="handleEdit( scope.row.id)">删除</el-button>
                        </template>
                        </el-table-column>
                    </el-table>
                </div>
			</div>
		</div>
		<!-- <foot></foot> -->
        <!-- 打开弹窗 -->
        <el-dialog
        title=""
		class="t_idcardshow"
        :visible.sync="addzhubo"
        width="400px">
			<div style="text-align: center;margin-bottom: 30px;font-size: 18px;">添加名单</div>
            <div style="text-align: center;">
                <el-input class="t_incard" v-model.trim="zbname" placeholder="输入证件号"  ></el-input>
                <el-button @click="startzb" style="margin-top: 20px;" round type="danger">确认添加</el-button>
            </div>

        </el-dialog>

	</div>
</template>

<script>
	import axios from 'axios'
	import top from '@/components/top.vue'
	import left from '@/components/left.vue'
	import foot from '@/components/foot.vue'


	export default {
		components: {
			"left": left,
			"top": top,
			"foot": foot
		},
		name: 'productionBasismanagDj',
		data() {
			return{
				tableData: [],
                addzhubo:false,
				zbname:''

			}
		},
		created() {
			this.getlist()
		},
		methods: {
			getlist(){
				axios.get('/api/plan-market/not-process-data/list').then((response)=>{
					// console.log(response)
					this.tableData=response.data.data
				})
			},
			//删除主播
			handleEdit(id){
                this.$confirm('是否确认删除?', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning'
                }).then(() => {
                    axios.post('/api/plan-market/not-process-data/delete',{
						id:id
					}).then((response)=>{
						this.$message({
							type: 'success',
							message: '操作成功!'
						});

						this.getlist()
					})
                }).catch(() => {
                    this.$message({
                        type: 'info',
                        message: '已取消'
                    });
                });
            },
            daka(){
                this.addzhubo=true
				this.zbname=''
            },
			//添加主播
    
            startzb(){
				axios.post('/api/plan-market/not-process-data/set',{
						id_card_num:this.zbname
					}).then((response)=>{
						// console.log(response)
						if(response.data.msg.code==0){
							this.$message({
								type: 'success',
								message: '操作成功!'
							});
							this.addzhubo=false

							this.getlist()
						}else{
							this.$message.error(response.data.msg.info);
						}

					})
                // this.$confirm('是否确认添加?', '提示', {
                //     confirmButtonText: '确定',
                //     cancelButtonText: '取消',
                //     type: 'warning'
                // }).then(() => {

                // }).catch(() => {
                //     this.$message({
                //         type: 'info',
                //         message: '已取消'
                //     });
                // });
            }

		}
	}
</script>

<style scoped>
/deep/.t_idcardshow .el-dialog__body{
	padding-top: 0;
}
/deep/.t_incard .el-input__inner{
	background-color: #f8f8f8;
}
</style>
<style lang="scss" scoped>
	.index {
		.t_table_box{
		    width: 96%;
		    margin-left: auto;
		    margin-right: auto;
		    margin-top: 20px;
		}

		.see {
			color: #409EFF;
			margin: 20px 0;
			cursor: pointer;
		}

		.cpflex {
			display: flex;
			flex-wrap: wrap;

			/deep/ .el-form-item {
				margin-bottom: 0px;
			}
		}

		.kucun {
			/deep/ .el-input {
				width: 200px;
			}

			.list {
				display: flex;
				text-align: center;
				border-bottom: 1px #EAEAEA solid;

				.bor1 {
					border-right: 1px #EAEAEA solid;

					i {
						color: #409EFF;
						font-size: 14px;
						margin-left: 10px;
						cursor: pointer;
					}
				}

				.th {
					background: #F9F9F9;
					line-height: 45px;
					flex: 1;
					font-size: 14px;
					box-sizing: border-box;
				}

				.td {
					line-height: 45px;
					font-size: 14px;
					flex: 1;
					box-sizing: border-box;
					color: #666;
				}

				.td2 {
					flex: 1.5
				}
			}
		}



				.o_ul {
					background: #F9F9F9;
					display: flex;

					.o_li {
						flex-basis: 160px;
						line-height: 45px;
						display: block;
						color: #727272;
						border-top: 3px #F9F9F9 solid;
						font-size: 14px;
						text-align: center;
					}

					.act {
						border-top: 3px #DD2727 solid;
						background: #FFFFFF;
					}
				}

				.title {
					border-bottom: 1px #EAEAEA solid;
					line-height: 45px;
					padding-left: 30px;
					font-size: 16px;
					background: #F9F9F9;
					color: #727272
				}

				.bsm {
					padding: 20px 20px 0 20px;

					/deep/ .el-input {
						width: 220px;
					}
				}

				.row2 {
					color: #FFF;
					margin-top: 20px;

					a {
						color: #FFF;
					}
				}

				.con {
					margin: 20px;
					border: 1px #EAEAEA solid;

					.list {
						display: flex;
						text-align: center;
						border-bottom: 1px #EAEAEA solid;

						.bor1 {
							border-right: 1px #EAEAEA solid;

							i {
								color: #409EFF;
								font-size: 14px;
								margin-left: 10px;
								cursor: pointer;
							}
						}

						.th {
							background: #F9F9F9;
							line-height: 45px;
							flex: 1;
							font-size: 14px;
							box-sizing: border-box;
						}

						.td {
							line-height: 45px;
							font-size: 14px;
							flex: 1;
							box-sizing: border-box;
							color: #666;
						}

						.td2 {
							flex: 1.5
						}
					}
				}

				.el-pagination {
					text-align: right;
					margin-right: 20px;
					padding-bottom: 50px;
				}

	}
</style>
